import request from '@/utils/request'

// 查询品牌列表
export function listOrdersGoods(query) {
  return request({
    url: '/goods/ordersGoods',
    method: 'get',
    params: query
  })
}

// 查询品牌详细
export function getOrdersGoods(ordersGoodsId) {
  return request({
    url: '/goods/ordersGoods/' + ordersGoodsId,
    method: 'get'
  })
}

// 新增品牌
export function addOrdersGoods(data) {
  return request({
    url: '/goods/ordersGoods',
    method: 'post',
    data: data
  })
}
// 新增自定义价格
export function customAdddictLabel(data) {
  return request({
    url: '/system/dict/data/customAdd',
    method: 'post',
    data: data
  })
}

// 修改品牌
export function updateOrdersGoods(data) {
  return request({
    url: '/goods/ordersGoods',
    method: 'put',
    data: data
  })
}

// 删除定时任务调度
export function delOrdersGoods(goodsIds) {
  return request({
    url: '/goods/ordersGoods/' + goodsIds,
    method: 'delete'
  })
}
// 刷新缓存
export function refreshCache() {
  return request({
    url: '/system/dict/type/refreshCache',
    method: 'delete'
  })
}

export default {
  list:listOrdersGoods,
  get:getOrdersGoods,
  add:addOrdersGoods,
  update:updateOrdersGoods,
  del:delOrdersGoods
}